package com.reportcenter.action;

import com.opensymphony.xwork2.ActionSupport;
import com.reportcenter.services.IUserService;
import com.reportcenter.vo.User;

@SuppressWarnings("serial")
public class LoginAction extends ActionSupport{
		private String name;
		private String password;
		private Integer id;
		public Integer getId() {
			return id;
		}

		public void setId(Integer id) {
			this.id = id;
		}

		private IUserService iUserService;
		
		public IUserService getiUserService() {
			return iUserService;
		}

		public void setiUserService(IUserService iUserService) {
			this.iUserService = iUserService;
		}

		public String getName() {
			return name;
		}
		
		public void setName(String name) {
			this.name = name;
		}

		public String getPassword() {
			return password;
		}

		public void setPassword(String password) {
			this.password = password;
		}
		
		public String execute(){
			User user = iUserService.getUserById(id);
			System.out.println(user.getName());
			System.out.println(user.getForgetemail());
			System.out.println(user.getPassword());
			return SUCCESS;
		}		
}
